import {
  setToken,
  getToken
} from '@/libs/util'

export default {
  state: {
    vuexAfterSaleProperty:[],//分类设置用于保存传参index
    vuexAfterSalePropertyArr:[],//分类设置用于显示baseinfo
    vuexAfterSaleAttrArr:[],//关联属性
    vuexAfterSaleAttr:[],//关联属性

    vuexAfterSaleDescription:'',
    vuexAfterSaleAdvantage:'',
    vuexAfterSaleParameter:'',
    vuexAfterSaleSpecification:'',




    vuexAfterSaleBasicObj: {
      product_supply_id:'',
      pattern: 0, // 默认单规格
       is_hot:0,
      normsValueSingle:[
        {
        cover_image: '', //封面
        name:'', //规格名称
        price: 0, //周期价格
        cost: 0, //成本
        number: 0,// 库存
        sale_count: 0,//虚拟销量
        src: '',
        norms_ids: 0,
        package_price:0,
        package_day:0
       }
      ],
      normsValue: [
        {
        cover_image: '', //封面
        name:'', //规格名称
        price: 0, //周期价格
        cost: 0, //成本
        number: 0,// 库存
        sale_count: 0,//虚拟销量
        src: '',
        norms_ids: 0,
        package_price:0,
        package_day:0
       }
      ]

    }
  },
  mutations: {
    setVuexAfterSaleBasicObj(state, obj) {
      state.vuexAfterSaleBasicObj = obj
    },
    setVuexAfterSaleSingle(state,arr){
      // 单规格
      state.vuexAfterSaleBasicObj.normsValueSingle=arr
    },
    setVuexAfterSaleMany(state,arr){
      // 多规格
      state.vuexAfterSaleBasicObj.normsValue=arr
    },
    setVuxAfterSaleProperty(state,arr){
      // 分类设置
      state.vuexAfterSaleProperty=arr
    },
    setVuxAfterSalePropertyArr(state,arr){
      // 分类设置
      state.vuexAfterSalePropertyArr=arr
    },

    setVuexAfterSaleAttr(state,arr){
      // 关联
      state.vuexAfterSaleAttr=arr
    },
    setVuexAfterSaleAttrArr(state,arr){
      // 关联
      state.vuexAfterSaleAttrArr=arr
    },

    setVuexAfterDescription(state,str){
      // 详情设置
      state.vuexAfterSaleDescription=str
    },

    setVuexAfterAdvantage(state,str){
      // 亮点设置
      state.vuexAfterSaleAdvantage=str
    },
    setVuexAfterParameter(state,str){
      // 参数设置
      state.vuexAfterSaleParameter=str
    },
    setVuexAfterSpecification(state,str){
      // 说明书
      state.vuexAfterSaleSpecification=str
    },

  },
  getters: {

  },
  actions: {

  }
}
